KFbxLayerElement Class Reference

#include <kfbxlayer.h>
Inheritance diagram for KFbxLayerElement:
Inheritance graph
[legend]

List of all members.


Detailed Description

Base class for elements of layers (KFbxLayer).

A layer element type is identified by ELayerElementType. A KFbxLayerElement describes how the layer element is mapped to a geometry surface and how the mapping information is arranged in memory.

See also:
KFbxLayer

Definition at line 78 of file kfbxlayer.h.


Public Types

enum   ELayerElementType {
   eUNDEFINED,
   eNORMAL,
   eBINORMAL,
   eTANGENT,
   eMATERIAL,
   ePOLYGON_GROUP,
   eUV,
   eVERTEX_COLOR,
   eSMOOTHING,
   eVERTEX_CREASE,
   eEDGE_CREASE,
   eHOLE,
   eUSER_DATA,
   eVISIBILITY,
   eDIFFUSE_TEXTURES,
   eDIFFUSE_FACTOR_TEXTURES,
   eEMISSIVE_TEXTURES,
   eEMISSIVE_FACTOR_TEXTURES,
   eAMBIENT_TEXTURES,
   eAMBIENT_FACTOR_TEXTURES,
   eSPECULAR_TEXTURES,
   eSPECULAR_FACTOR_TEXTURES,
   eSHININESS_TEXTURES,
   eNORMALMAP_TEXTURES,
   eBUMP_TEXTURES,
   eTRANSPARENT_TEXTURES,
   eTRANSPARENCY_FACTOR_TEXTURES,
   eREFLECTION_TEXTURES,
   eREFLECTION_FACTOR_TEXTURES,
   eDISPLACEMENT_TEXTURES,
   eLAST_ELEMENT_TYPE
}
  Layer Element type identifier. More...
enum   EMappingMode {
   eNONE,
   eBY_CONTROL_POINT,
   eBY_POLYGON_VERTEX,
   eBY_POLYGON,
   eBY_EDGE,
   eALL_SAME
}
  Determines how the element is mapped to a surface. More...
enum   EReferenceMode {
   eDIRECT,
   eINDEX,
   eINDEX_TO_DIRECT
}
  Determines how the mapping information is stored in the array of coordinates. More...

Public Member Functions

void  SetMappingMode (EMappingMode pMappingMode)
  Sets the Mapping Mode.
void  SetReferenceMode (EReferenceMode pReferenceMode)
  Sets the Reference Mode.
EMappingMode  GetMappingMode () const
  Returns the Mapping Mode.
EReferenceMode  GetReferenceMode () const
  Returns the Reference Mode.
void  SetName (const char *pName)
  Sets the name of this object.
const char *  GetName () const
  Returns the name of this object.
bool  operator== (const KFbxLayerElement &pOther) const
  Equivalence operator.
KFbxLayerElement operator= (KFbxLayerElement const &pOther)
  Assignment operator.
void  Destroy ()
  Removes this layer element from its owner and delete it.
virtual bool  Clear ()
  Clears all the data from this layer element.

Static Public Attributes

static const int  LAYERELEMENT_TYPE_TEXTURE_START_INDEX = int(eDIFFUSE_TEXTURES)
  The start index of texture type layer elements.
static const int  LAYERELEMENT_TYPE_TEXTURE_END_INDEX = int(eDISPLACEMENT_TEXTURES)
  The end index of texture type layer elements.
static const int  LAYERELEMENT_TYPE_TEXTURE_COUNT = int(eLAST_ELEMENT_TYPE - eDIFFUSE_TEXTURES)
  The count of texture type layer elements.
static const int  LAYERELEMENT_TYPE_NON_TEXTURE_START_INDEX = int(eNORMAL)
  The start index of non-texture type layer elements.
static const int  LAYERELEMENT_TYPE_NON_TEXTURE_END_INDEX = int(eVISIBILITY)
  The end index of non-texture type layer elements.
static const int  LAYERELEMENT_TYPE_NON_TEXTURE_COUNT = int(eDIFFUSE_TEXTURES - eUNDEFINED - 1)
  The count of non-texture type layer elements.
static const char *  TEXTURE_NAMES []
  Array of names of texture type layer elements.
static const char *  TEXTURE_UV_NAMES []
  Array of names of UV layer elements.
static const char *  NON_TEXTURE_NAMES []
  Array of names of non-texture type layer elements.
static KFbxDataType  TEXTURE_TYPES []
  Array of texture types.
static const char *  TEXTURE_CHANNEL_NAMES []
  Array of texture channels.

Member Enumeration Documentation

Layer Element type identifier.

Enumerator:
eUNDEFINED 
eNORMAL 
eBINORMAL 
eTANGENT 
eMATERIAL 
ePOLYGON_GROUP 
eUV 
eVERTEX_COLOR 
eSMOOTHING 
eVERTEX_CREASE 
eEDGE_CREASE 
eHOLE 
eUSER_DATA 
eVISIBILITY 
eDIFFUSE_TEXTURES 
eDIFFUSE_FACTOR_TEXTURES 
eEMISSIVE_TEXTURES 
eEMISSIVE_FACTOR_TEXTURES 
eAMBIENT_TEXTURES 
eAMBIENT_FACTOR_TEXTURES 
eSPECULAR_TEXTURES 
eSPECULAR_FACTOR_TEXTURES 
eSHININESS_TEXTURES 
eNORMALMAP_TEXTURES 
eBUMP_TEXTURES 
eTRANSPARENT_TEXTURES 
eTRANSPARENCY_FACTOR_TEXTURES 
eREFLECTION_TEXTURES 
eREFLECTION_FACTOR_TEXTURES 
eDISPLACEMENT_TEXTURES 
eLAST_ELEMENT_TYPE 

Definition at line 116 of file kfbxlayer.h.

Determines how the element is mapped to a surface.

  • eNONE The mapping is undetermined.
  • eBY_CONTROL_POINT There will be one mapping coordinate for each surface control point/vertex.
  • eBY_POLYGON_VERTEX There will be one mapping coordinate for each vertex, for every polygon of which it is a part. This means that a vertex will have as many mapping coordinates as polygons of which it is a part.
  • eBY_POLYGON There can be only one mapping coordinate for the whole polygon.
  • eBY_EDGE There will be one mapping coordinate for each unique edge in the mesh. This is meant to be used with smoothing layer elements.
  • eALL_SAME There can be only one mapping coordinate for the whole surface.
Enumerator:
eNONE 
eBY_CONTROL_POINT 
eBY_POLYGON_VERTEX 
eBY_POLYGON 
eBY_EDGE 
eALL_SAME 

Definition at line 210 of file kfbxlayer.h.

Determines how the mapping information is stored in the array of coordinates.

  • eDIRECT This indicates that the mapping information for the n'th element is found in the n'th place of KFbxLayerElementTemplate::mDirectArray.
  • eINDEX, This symbol is kept for backward compatibility with FBX v5.0 files. In FBX v6.0 and higher, this symbol is replaced with eINDEX_TO_DIRECT.
  • eINDEX_TO_DIRECT This indicates that the KFbxLayerElementTemplate::mIndexArray contains, for the n'th element, an index in the KFbxLayerElementTemplate::mDirectArray array of mapping elements. eINDEX_TO_DIRECT is usually useful for storing eBY_POLYGON_VERTEX mapping mode elements coordinates. Since the same coordinates are usually repeated many times, this saves spaces by storing the coordinate only one time and then referring to them with an index. Materials and Textures are also referenced with this mode and the actual Material/Texture can be accessed via the KFbxLayerElementTemplate::mDirectArray
Enumerator:
eDIRECT 
eINDEX 
eINDEX_TO_DIRECT 

Definition at line 233 of file kfbxlayer.h.


Member Function Documentation

void SetMappingMode ( EMappingMode  pMappingMode  )  [inline]

Sets the Mapping Mode.

Parameters:
pMappingMode  Specifies the way that layer element is mapped to a surface.

Definition at line 244 of file kfbxlayer.h.

void SetReferenceMode ( EReferenceMode  pReferenceMode  )  [inline]

Sets the Reference Mode.

Parameters:
pReferenceMode  Specifies the reference mode.

Reimplemented in KFbxLayerElementSmoothing, KFbxLayerElementCrease, and KFbxLayerElementHole.

Definition at line 249 of file kfbxlayer.h.

EMappingMode GetMappingMode (  )  const [inline]

Returns the Mapping Mode.

Returns:
The current Mapping Mode.

Definition at line 254 of file kfbxlayer.h.

EReferenceMode GetReferenceMode (  )  const [inline]

Returns the Reference Mode.

Returns:
The current Reference Mode.

Definition at line 259 of file kfbxlayer.h.

Referenced by KFbxLayerElementUserData::operator=(), KFbxLayerElementTemplate< KFbxSurfaceMaterial * >::operator=(), and KFbxLayerElementTemplate< KFbxSurfaceMaterial * >::operator==().

void SetName ( const char *  pName  )  [inline]

Sets the name of this object.

Parameters:
pName  Specifies the name of this LayerElement object.

Definition at line 264 of file kfbxlayer.h.

const char* GetName (  )  const [inline]

Returns the name of this object.

Returns:
The current name of this LayerElement object.

Definition at line 269 of file kfbxlayer.h.

bool operator== ( const KFbxLayerElement pOther  )  const [inline]

Equivalence operator.

Parameters:
pOther  Layer element to be compared.
Returns:
True if equal, false otherwise.

Definition at line 275 of file kfbxlayer.h.

Referenced by KFbxLayerElementTemplate< KFbxSurfaceMaterial * >::operator==().

KFbxLayerElement& operator= ( KFbxLayerElement const &  pOther  )  [inline]

Assignment operator.

Parameters:
pOther  Layer element assigned to this one.
Returns:
This layer element after assignment.

Definition at line 286 of file kfbxlayer.h.

void Destroy (  ) 

Removes this layer element from its owner and delete it.

virtual bool Clear (  )  [inline, virtual]

Member Data Documentation

const int LAYERELEMENT_TYPE_TEXTURE_START_INDEX = int(eDIFFUSE_TEXTURES) [static]

The start index of texture type layer elements.

Definition at line 166 of file kfbxlayer.h.

const int LAYERELEMENT_TYPE_TEXTURE_END_INDEX = int(eDISPLACEMENT_TEXTURES) [static]

The end index of texture type layer elements.

Definition at line 169 of file kfbxlayer.h.

const int LAYERELEMENT_TYPE_TEXTURE_COUNT = int(eLAST_ELEMENT_TYPE - eDIFFUSE_TEXTURES) [static]

The count of texture type layer elements.

Definition at line 172 of file kfbxlayer.h.

The start index of non-texture type layer elements.

Definition at line 175 of file kfbxlayer.h.

const int LAYERELEMENT_TYPE_NON_TEXTURE_END_INDEX = int(eVISIBILITY) [static]

The end index of non-texture type layer elements.

Definition at line 178 of file kfbxlayer.h.

const int LAYERELEMENT_TYPE_NON_TEXTURE_COUNT = int(eDIFFUSE_TEXTURES - eUNDEFINED - 1) [static]

The count of non-texture type layer elements.

Definition at line 181 of file kfbxlayer.h.

const char* TEXTURE_NAMES[] [static]

Array of names of texture type layer elements.

Definition at line 186 of file kfbxlayer.h.

const char* TEXTURE_UV_NAMES[] [static]

Array of names of UV layer elements.

Definition at line 189 of file kfbxlayer.h.

const char* NON_TEXTURE_NAMES[] [static]

Array of names of non-texture type layer elements.

Definition at line 192 of file kfbxlayer.h.

Array of texture types.

Definition at line 195 of file kfbxlayer.h.

const char* TEXTURE_CHANNEL_NAMES[] [static]

Array of texture channels.

Definition at line 198 of file kfbxlayer.h.

KFbxLayerElement KFbxLayerElement KFbxLayerElement KFbxLayerElement KFbxLayerElement KFbxLayerElement KFbxLayerElement KFbxLayerElement KFbxLayerElement KFbxLayerElement
KFbxLayerElement KFbxLayerElement KFbxLayerElement KFbxLayerElement KFbxLayerElement KFbxLayerElement KFbxLayerElement KFbxLayerElement KFbxLayerElement KFbxLayerElement